﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Revis.VClinicNet.Util.Extensions;

namespace Revis.VClinicNet.Core.Domain.Persistence.Nh.Tests
{
    internal static class Rich
    {
        private static readonly Random rand = new Random();

        public static Doctor Doctor()
        {
            return Doctor(null);
        }

        public static Doctor Doctor(IDateTimeService dateService)
        {
            return new Doctor(
                0,
                rand.String(5),
                rand.String(5),
                dateService);
        }

        public static PersonalData PersonalData()
        {
            return new PersonalData(
                rand.String(5),
                rand.String(5),
                rand.NumberString(11),
                Address());
        }

        public static Address Address()
        {
            return new Address(
                rand.String(5),
                rand.NumberString(2),
                rand.NumberString(5),
                rand.String(5),
                rand.String(5),
                rand.NumberString(8));
        }

        public static EntryContent EntryContent()
        {
            return new EntryContent(rand.String(5), rand.String(5), rand.String(5));
        }

        public static WorkTime WorkTime()
        {
            Time begin = new Time(rand.Integer(8, 10), rand.Integer(0, 59));
            Time end = new Time(rand.Integer(14, 18), rand.Integer(0, 59));
            DayOfWeek day = (DayOfWeek)rand.Integer(0, 6);
            return new WorkTime(day, begin, end, rand.String(5), true);
        }

        public static WorkTime WorkTime(DayOfWeek day)
        {
            WorkTime worktime = WorkTime();
            worktime.Day = day;
            return worktime;
        }

        public static Time Time()
        {
            return new Time(rand.Integer(0, 23), rand.Integer(0, 59));
        }

    }
}
